package com.github.ecbp.common.exception.base;


import com.github.ecbp.common.api.IErrorCode;

public class SystemException extends RuntimeException {
    private IErrorCode respEnum;


    public static SystemException create() {
        SystemException instance = new SystemException();
        return instance;
    }

    public static SystemException create(String message) {
        SystemException instance = new SystemException(message);
        return instance;
    }

    public static SystemException create(IErrorCode respEnum) {
        SystemException instance = new SystemException();
        instance.setRespEnum(respEnum);
        return instance;
    }

    public SystemException() {
        super();
    }

    public SystemException(String message) {
        super(message);
    }

    public SystemException(String message, Throwable cause) {
        super(message, cause);
    }

    public SystemException(Throwable cause) {
        super(cause);
    }

    protected SystemException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }

    public IErrorCode getRespEnum() {
        return respEnum;
    }

    public void setRespEnum(IErrorCode respEnum) {
        this.respEnum = respEnum;
    }
}
